package cn.stylefeng.guns.modular.time.model.request;

import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import lombok.Data;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class TransactionRequest {

    @ChineseDescription("记录ID")
    @NotNull(message = "记录ID不能为空", groups = {edit.class, delete.class})
    private Long transactionId;

    @ChineseDescription("金额")
    @NotNull(message = "金额不能为空", groups = {add.class, edit.class})
    private BigDecimal amount;

    @ChineseDescription("类型：收入/支出")
    @NotBlank(message = "类型不能为空", groups = {add.class, edit.class})
    private String type;

    @ChineseDescription("分类")
    private String category;

    @ChineseDescription("发生日期")
    @NotNull(message = "发生日期不能为空", groups = {add.class, edit.class})
    private Date transactionDate;

    @ChineseDescription("备注")
    private String note;

    @ChineseDescription("页码")
    private Integer pageNo = 1;

    @ChineseDescription("每页条数")
    private Integer pageSize = 10;

    @ChineseDescription("开始日期")
    private Date startDate;

    @ChineseDescription("结束日期")
    private Date endDate;

    public @interface add {}
    public @interface edit {}
    public @interface delete {}
}

